<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>视频管理</title>
    <link href="<?php echo $_BASE_DIR ?>css_v1/style.css" rel="stylesheet" type="text/css"/>
    <link href="<?php echo $_BASE_DIR ?>css_v1/select.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/jquery.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/jmw.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/select-ui.min.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/jquery.DatePicker.js"></script>

    <script type="text/javascript">
        $(document).ready(function (e) {
            $(".select1").uedSelect({
                width: 345
            });
            $(".select2").uedSelect({
                width: 167
            });
            $(".select3").uedSelect({
                width: 80
            });
        });
    </script>


</head>

<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="<?php echo url("leftmenu/bottom") ?>">首页</a></li>
        <li><a href="#">视频管理</a></li>
    </ul>
</div>
<form method="post" action="<?php echo url("video/index") ?>">
    <div style="clear: both;width:1100px;height:35px;line-height:35px;margin-bottom:5px;">
        <div class="rightinfo">
            <!--------------------------------------->
            <ul class="seachforms">
                <li>
                    <label>名称：</label>
                    <input type="text" name="name" class="scinputjmw"
                           value="<?php echo isset($param['title']) ? $param['title'] : ''; ?>"/>
                </li>
                <li><label>&nbsp;</label><input type="submit" class="scbtn" value="查询" style="width:60px;"/></li>
            </ul>
        </div>
    </div>

</form>
<div class="tools">

    <ul class="toolbar">
        <li><a href="<?php echo url("video/add") ?>"><span><img src="<?php echo $_BASE_DIR ?>images_v1/t01.png"/></span>添加</a>
        </li>
        <li><a href="#" onclick="editindex('tagid','<?php echo url("video/add") ?>/id/')"><span><img
                            src="<?php echo $_BASE_DIR ?>images_v1/t02.png"/></span>修改</a></li>

        <li class="click"><a href="#" onclick="isDel('tagid','<?php echo url("video/del") ?>','ids[]')"><span><img
                            src="<?php echo $_BASE_DIR ?>images_v1/t03.png"/></span>删除</a></li>

    </ul>


</div>
<!---------------------------------------------------------------------------- -->

<script>
    $('#usedtime_timestart').datePicker({followOffset: [0, 24]});
    $('#usedtime_timeend').datePicker({followOffset: [0, 24]});
</script>
<form action="" method="post" name="form">

    <table class="tablelist">

        <thead>
        <tr>
            <th width="5%"><input type="checkbox" value="on" name="chkall" onClick="CheckAll(this.form)"/></th>

            <th width="15%">名称</th>

            <th width="5%">播放量</th>

            <th width="5%">类型</th>
            <th width="20%">小程序链接</th>
            <th width="15%">操作</th>


        </tr>
        </thead>
        <tbody>
		<?php foreach ($item as $k => $v): ?>
            <tr>
                <td><input name="tagid" id="tagid" type="checkbox" value="<?php echo $v->id ?>"/></td>

                <td><?php echo h($v->title) ?></td>

                <td><?php echo h($v->page_view) ?></td>

                <td><?php
					switch ($v->style) {
						case 0:
							$name = '视频';
							break;
						case 1:
							$name = '音频';
							break;
						case 2:
							$name = '文章';
							break;
						case 3:
							$name = '直播';
							break;
						default:
							$name = '其它';
							break;
					}
					echo h($name);
					?></td>
                <td><?php echo $v->style != 3 ? '/pages/course-detail/course-detail?video_id=' . $v->id : '/pages/live-class/live-class?video_id=' . $v->id ?></td>
                <td>
                    <a style="<?php echo $v->style == 3 ? 'display:none' : '' ?>"
                       href="<?php echo url("videochapter/index", array('video_id' => $v->id)) ?>">章节管理</a>
                    &nbsp;&nbsp;
                    <a style="<?php echo $v->style == 3 ? 'display:none' : '' ?>"
                       href="<?php echo url("videopintuan/index", array('video_id' => $v->id)) ?>">拼团管理</a>
                    &nbsp;&nbsp;
                    <a href="<?php echo url("video/comment", array('video_id' => $v->id)) ?>">留言管理</a>

					<?php if ($v->style == 3) { ?>
                        &nbsp;&nbsp;
                        <a href="<?php echo url("video/liveroom", array('video_id' => $v->id)) ?>">直播间在线用户</a>
					<?php } ?>
                </td>

            </tr>
		<?php endforeach; ?>

        </tbody>
    </table>

</form>

<?php echo Q::control('pagination', 'pagination', array('url_args' => $param, 'pagination' => $pagination, 'show_count' => 1)) ?>
</div>
<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>

</body>
<iframe id="excel" name="excel" width="0" height="0"></iframe>
</html>


